dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b83f3ae
)
Use estimateRowCount() in CleanupTable rather than select count(*) which will take...
author
Chad Horohoe
<demon@users.mediawiki.org>
Fri, 8 Jul 2011 22:08:19 +0000
(22:08 +0000)
committer
Chad Horohoe
<demon@users.mediawiki.org>
Fri, 8 Jul 2011 22:08:19 +0000
(22:08 +0000)
maintenance/cleanupTable.inc
patch
|
blob
|
history
diff --git
a/maintenance/cleanupTable.inc
b/maintenance/cleanupTable.inc
index
67a3251
..
60f2346
100644
(file)
--- a/
maintenance/cleanupTable.inc
+++ b/
maintenance/cleanupTable.inc
@@
-101,7
+101,8
@@
class TableCleanup extends Maintenance {
}
$table = $params['table'];
- $count = $dbr->selectField( $table, 'count(*)', $params['conds'], __METHOD__ );
+ // count(*) would melt the DB for huge tables, we can estimate here
+ $dbr->estimateRowCount( $table, '*', '', __METHOD__ );
$this->init( $count, $table );
$this->output( "Processing $table...\n" );